﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MedioTransporte.ascx.cs" Inherits="WebSite.Controles.MedioTransporte" %>
<table>
    <tr>
        <td>Tipo de Transporte</td>
        <td>
            <asp:DropDownList ID="cboTipo" runat="server">
            </asp:DropDownList>
        </td>
        <td></td>
    </tr>
        <tr>
        <td>Estado</td>
        <td>
            <asp:DropDownList ID="cboEstado" runat="server">
                <asp:ListItem Value="1">Activo</asp:ListItem>
                <asp:ListItem Value="0">Inactivo</asp:ListItem>
            </asp:DropDownList>
        </td>
        <td>
            <asp:Button ID="cmdConsultar" runat="server" Text="Consultar" /></td>
    </tr>
</table>

<asp:GridView ID="DgConsultar" runat="server" AutoGenerateColumns="False" 
    DataKeyNames="TransporteId" DataSourceID="SqlDataSource1">
    <Columns>
        <asp:BoundField DataField="TransporteId" HeaderText="Codigo" 
            SortExpression="TransporteId">
            <ItemStyle Width="60px" />
        </asp:BoundField>
        <asp:BoundField DataField="Marca" HeaderText="Marca" SortExpression="Marca" >
            <ItemStyle Width="100px" />
        </asp:BoundField>
        <asp:BoundField DataField="Modelo" HeaderText="Modelo" SortExpression="Modelo">
             <ItemStyle Width="120px" />
        </asp:BoundField>
        <asp:BoundField DataField="TipoTransporte" HeaderText="TipoTransporte" SortExpression="TipoTransporte">
             <ItemStyle Width="120px" />
        </asp:BoundField>
        <asp:BoundField DataField="Placa" HeaderText="Placa" SortExpression="Placa">
             <ItemStyle Width="100px" />
        </asp:BoundField>
        <asp:BoundField DataField="Estado" HeaderText="Estado" SortExpression="Estado">
             <ItemStyle Width="50px" />
        </asp:BoundField>
        <asp:BoundField DataField="Capacidad" HeaderText="Capacidad" SortExpression="Capacidad">
             <ItemStyle Width="50px" />
        </asp:BoundField>
        <asp:ButtonField Text="Asignar Recursos" />
<%--        
        <asp:BoundField DataField="FechaIngreso" HeaderText="FechaIngreso" 
            SortExpression="FechaIngreso" /> 
        <asp:BoundField DataField="TourId" HeaderText="TourId" 
            SortExpression="TourId" />
        <asp:BoundField DataField="ModeloId" HeaderText="ModeloId" 
            SortExpression="ModeloId" />
        <asp:BoundField DataField="TipoTrasporteId" HeaderText="TipoTrasporteId" 
            SortExpression="TipoTrasporteId" />--%>
        
    </Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConnectionString="<%$ ConnectionStrings:BD_OPERACIONESConnectionString %>" 
    SelectCommand="MedioTransporte_Consultar" SelectCommandType="StoredProcedure">
    <SelectParameters>
        <asp:ControlParameter ControlID="cboTipo" Name="tipotransporte" 
            PropertyName="SelectedValue" Type="Int32" DefaultValue="3" />
        <asp:ControlParameter ControlID="cboEstado" Name="estado" 
            PropertyName="SelectedValue" Type="Int32" DefaultValue="1" />
    </SelectParameters>
</asp:SqlDataSource>